//获取多久以前的时间
//n为你要传入的参数，当前为0，前一天为-1，后一天为1
function getBeforeDate(n) { 
	let date = new Date();
	let year, month, day, s;
	date.setDate(date.getDate() + n);
	year = date.getFullYear();
	month = date.getMonth() + 1;
	day = date.getDate();
	s = year + '-' + (month < 10 ? ('0' + month) : month) + '-' + (day < 10 ? ('0' + day) : day);
	return s;
}
export default{
	getBeforeDate
}